<template>
	<view>
		<uni-card   v-for="(ent,index) in list" :key="index" @click="buba(ent.departmentid)">
			<uni-card>
			<text>{{ent.departName}}</text>
			</uni-card>
		</uni-card>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				enterid:'',
				list:[]
			}
		},
		onLoad(res) {
			this.enterid=res.enterid
			this.getA()
		},
		methods: {
			buba(departmentid){
				uni.reLaunch({
					url:'renyuan?departmentid='+departmentid
				})
			},
			getA(){
				console.log(this.enterid)
				uni.request({
					url:'http://localhost:8003/userproject/go/listgo?enterId='+this.enterid,
					method:'POST',
					success:(res)=> {
						this.list=res.data.data.list
					}
				})
			}
		}
	}
</script>

<style>

</style>
